package com.bosssoft.trainee.nontax.util.mapper.dtoVo;

import com.bosssoft.trainee.nontax.entity.dto.ResourceDto;
import com.bosssoft.trainee.nontax.entity.vo.ResourceVo;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;

import java.util.List;

/**
 * @Description: resource  dto vo transform util class
 * @Author: Luo WenLong
 * @Date: 2022/6/25 9:02
 */
@Mapper(componentModel = "spring")
public interface ResourceDtoVo {
    /**
     * @Description: dto to vo
     * @param resourceDto resource
     * @return: com.bosssoft.trainee.nontax.entity.vo.ResourceVo
     * @Author: Luo WenLong
     * @Date: 2022/6/25 9:12
     */
    @Mapping(source = "createTime", target = "createTime", dateFormat = "yyyy-MM-dd HH:mm:ss")
    ResourceVo dto2vo(ResourceDto resourceDto);

    /**
     * @Description: dto to vo
     * @param resourceDtos reourcce list
     * @return: java.util.List<com.bosssoft.trainee.nontax.entity.vo.ResourceVo>
     * @Author: Luo WenLong
     * @Date: 2022/6/25 9:12
     */
    List<ResourceVo> dto2vo(List<ResourceDto> resourceDtos);

    /**
     * @Description: vo tp dto
     * @param resourceVo resource
     * @return: com.bosssoft.trainee.nontax.entity.dto.ResourceDto
     * @Author: Luo WenLong
     * @Date: 2022/6/25 9:14
     */
    @Mapping(source = "createTime", target = "createTime", dateFormat = "yyyy-MM-dd HH:mm:ss")
    ResourceDto vo2dto(ResourceVo resourceVo);

    /**
     * @Description: vo tp dto
     * @param resourceVos resource list
     * @return: java.util.List<com.bosssoft.trainee.nontax.entity.dto.ResourceDto>
     * @Author: Luo WenLong
     * @Date: 2022/6/25 9:14
     */
    List<ResourceDto> vo2dto(List<ResourceVo> resourceVos);
}
